-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: graph component #585
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- make this a real npm package (add package.json etc), model after https://github.com/uwdata/mosaic/tree/main/packages/inputs for example
- add
@cosmograph/cosmograph
as a dependency to the package - either add this client to vgplot and make an example spec with this client or
- make an example in your new package that puts the graph on a website using something like this
const el = document.querySelector("#app")
const graphWidget = new GraphComponent({element: el})
this._histogramElement = histogramElement || document.createElement('div'); | ||
this._searchElement = searchElement || document.createElement('div'); | ||
this._timelineElement = timelineElement || document.createElement('div'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's not do this yet until we have the graph fully working
export class CosmographClient { | ||
constructor(targetElement, histogramElement, searchElement, timelineElement) { | ||
// Create containers for all components | ||
this._element = targetElement || document.createElement('div'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should fail when there is no element provided
Fixes #391
I’ve added a client.js file to adapt the graph component using Cosmograph's api.